闘本 1.9 文字列の回転
提出
code: txt
# waterbottle
# ttlewaterbo
# aterbottlew
# lewaterbott
# ttlewoterbo
# aaaaaaaaaaa
from collections import Counter
def is_rotate(s1, s2):
c1 = Counter(s1)
c2 = Counter(s2)
if c1 != c2:
return False
rest = ""
for i in range(len(s1)):
else break
if isSubstirng(s1, rest):
return True
else:
return False
実行結果
code: zsh
else break
^^^^^
SyntaxError: expected ':'